using System.ComponentModel.Composition;
using SixLabors.ImageSharp;

namespace ImageCSharp.Core.Interfaces
{
    /// <summary>
    /// 图像插件接口
    /// </summary>
    public interface IImagePlugin
    {
        /// <summary>
        /// 插件名称
        /// </summary>
        string Name { get; }

        /// <summary>
        /// 插件描述
        /// </summary>
        string Description { get; }

        /// <summary>
        /// 插件类别
        /// </summary>
        string Category { get; }

        /// <summary>
        /// 处理图像
        /// </summary>
        /// <param name="image">输入图像</param>
        /// <returns>处理后的图像</returns>
        Image ProcessImage(Image image);
    }

    /// <summary>
    /// 滤镜插件接口
    /// </summary>
    public interface IFilterPlugin : IImagePlugin
    {
        /// <summary>
        /// 滤镜参数
        /// </summary>
        Dictionary<string, object> Parameters { get; set; }
    }

    /// <summary>
    /// 选择工具插件接口
    /// </summary>
    public interface ISelectionPlugin : IImagePlugin
    {
        /// <summary>
        /// 选择区域
        /// </summary>
        RectangleF SelectionArea { get; set; }
    }

    /// <summary>
    /// 绘图工具插件接口
    /// </summary>
    public interface IDrawingPlugin : IImagePlugin
    {
        /// <summary>
        /// 绘图颜色
        /// </summary>
        Color Color { get; set; }

        /// <summary>
        /// 画笔宽度
        /// </summary>
        float Width { get; set; }
    }
}